/*
包含n个用于直接更新状态的方法的对象模块
 */
import { TOGGLE_COLLAPSE, GET_ROLES, GET_CATEGORY } from './mutation-types'

export default {
  [TOGGLE_COLLAPSE] (state) {
    state.isCollapse = !state.isCollapse
  },
  [GET_ROLES] (state, roles) {
    state.roles = roles
  },
  [GET_CATEGORY] (state, categorys) {
    state.categorys = categorys
  }
}
